package fate.xp3;

public class FateDecrypter implements XP3Decrypter {
    public void decrypt(byte[] chunk, int offset) {
        for (int i = 0; i < chunk.length; i++) {
            chunk[i] ^= 0x36;
        }
        if (offset <= 19 && 19 < offset + chunk.length ) {
            chunk[19-offset] ^= 1;
        }
        if (offset <= 0x2ea29 && 0x2ea29 < offset + chunk.length ) {
            chunk[0x2ea29-offset] ^= 3;
        }
    }
}
